<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/12/21 0021
  Time: 16:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <jsp:include page="/commons/common-js.jsp"></jsp:include>
</head>
<body>

<script id="demo" type="text/html">
    121121
</script>

<div id="view"></div>

<script>

    layui.use(['table', 'element','laytpl'], function () {
        var table = layui.table,
            element = layui.element,
            laytpl = layui.laytpl

        //第三步：渲染模版

        var getTpl = demo.innerHTML
            ,view = document.getElementById('view');
        laytpl(getTpl).render({}, function(html){
            view.innerHTML = html;
        });

    })


</script>

</body>
</html>
